-
Notifications
You must be signed in to change notification settings - Fork 49
CheriFreeRTOS hmka2 merge #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
heshamelmatary
wants to merge
67
commits into
main
Choose a base branch
from
freertos-hmka2-merge
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+394
−157
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TCP/IP stack + HTTP server + Echo clients/servers. It can build in cheribuild, but to run it, it needs a tap interface. Example command (for refernce): qemu-system-riscv64cheri -M virt -m 2048 -nographic -bios ./RISC-V-Generic_main_peekpoke.elf \ -device virtio-net-device,netdev=net0,mac=00:0a:35:04:db:77 -netdev \ tap,id=net0,ifname=tap0,script=no,downscript=no
This include HTTP, Echo, CLI, FTP, TFTP servers and FAT file system
Basing all FreeRTOS repos on the new official FreeRTOS GitHub repo forks, 202012-LTS release Only RISC-V-Generic is added, Galois' demos aren't included (yet).
Let FreeRTOS build system fails instead if the demo in not supported. This reduces maintenace effort having to add new demos in cheribuild
CheriFreeRTOS/libdl sets up global sym table for FreeRTOS, libc, and compiler-rt symbols and dynamically link against that lazily if a module references it. Hidden visibiliy makes all compiler-rt local/hidden and not be part of the global sym table which fails dynamic linking/loading.
Only works for libs to be linked with CheriFreeRTOS such as newlib and compiler-rt
…rectory This it to avoid having to rebuild compiler-rt every time another project with another ABI is rebuilt.
Needed for the existing compiler-rt-baremetal-riscv32-hybrid target.
Picocom misses some output when the serial output is too fast with lots of characters
) Many RISC-V simulators start with memory implicitly zeroed. I have PR-d a commit to CTSRD-CHERI/FreeRTOS-Demos-CHERI-RISC-V#5 which allows the .bss and .sbss zero-initialization to be disabled in these cases, because it takes too long to simulate and isn't necessary in this case. This commit adds an option to cheribuild which passes an option to the FreeRTOS demos to disable the zero-initialization.
4eade40
to
c0af649
Compare
arichardson
reviewed
Mar 20, 2025
* Comply with new typing for QEMU targets * Add xlen for 32-bit builds * Don't use gprel branch in LLVM by default, it's only needed for compartmentalisation * Remove vcu118-baremetal * Uncomment Alex's notifications in Jenkinsfile * Remove RISC-V's RVC option as it is now enabled by default
FreeRTOS only runs in M-Mode with the -bios flag without a kernel nor a disk image (typically).
c0af649
to
4474b90
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a first cut at trying to merge my old CheriFreeRTOS hmka2 branches into main so that others can use it with the latest toolchain, and validate/build on top of it. It could also be useful for CI to build, run, and test something quick (e.g., with toolchain updates, QEMU, or FPGA), and for other parties wanting to submit fixes or features on top of our CheriFreeRTOS.
It should be able to build and run vanilla RISC-V FreeRTOS and purecap CheriFreeRTOS on many targets, with lots of demos, ranging from simple
main_blinky
that only prints a few messages, to full OTA demos and CLI using networking, VirtIO, ethernet, etc. This merge will lack support for compartmentalisation, however, as it requires a specificgprel
LLVM branch. I leftgprel
conditional there in case someone might want to still use it.